package controller;

import org.springframework.web.bind.annotation.RestController;
 
import com.jfinal.core.Controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
// import io.swagger.annotations.ApiResponse;
// import io.swagger.annotations.ApiResponses;
 
 
@Api(value="index",tags={"IndexController"})
@RestController
public class IndexController extends Controller {
	/**
	 * 首页Action
	 */
	@ApiOperation(value = "/index", httpMethod = "POST",  notes = "方法1")
	@ApiImplicitParams({@ApiImplicitParam(paramType="query", required = false, name = "pname", value = "项目的名称",dataType="string"),
						@ApiImplicitParam(paramType="query",required = false, name = "pname2", value = "项目的名称2",dataType="string")})
	public void index() {
		String params = getPara("pname");
		String pname2 = getPara("pname2");
		 renderJson("{name:caiming,"+params+":"+pname2+"}");	 
	}
	
	@ApiOperation(value = "/getProjectByID", httpMethod = "POST",  notes = "方法2")
	@ApiImplicitParams({@ApiImplicitParam(paramType="query", required = true, name = "pname", value = "项目的名称",dataType="string"),
						@ApiImplicitParam(paramType="query",required = true, name = "pname2", value = "项目的名称2",dataType="string")})
	public void getProjectByID() {
		
		String params = getPara("pname");
		String pname2 = getPara("pname2");
 
		 renderJson("{name:caiming,"+params+":"+pname2+"}");	}
}


